package xzx.controller;

import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletResponse;
import lombok.Data;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Flux;
import xzx.service.IChatService;

import java.lang.reflect.ReflectPermission;

/**
 * @className: ChatHollerWorldController
 * @author: xzx
 * @date: 2025-10-20
 **/
@RestController
@RequestMapping("/chat")
public class ChatHollerWorldController {
    @Resource
    private IChatService chatService;

    @GetMapping("/test/{message}")
    public Flux<String> chatTest1(@PathVariable("message")String message, HttpServletResponse response){
        response.setCharacterEncoding("UTF-8");
        return chatService.chatTest1(message);
    }
}
